#!/bin/sh
#desc:First configuration wizard
#package:odcgi
#type:local

TMPCFGFILE="/tmp/wizFirstConfiguration.cfg"
. $TMPCFGFILE

URLVAL="http://cloud.opendomo.com/activate/"

echo "#LOADING Applying changes. Please wait!"
echo

echo admin "$fullname" "$email" opendomo "$2" "$3"
/usr/local/opendomo/services/config/modUser.sh admin "$fullname" "$email" opendomo "$2" "$3"

uid=`cat /etc/opendomo/uid` 2>/dev/null
ver=`cat /etc/VERSION` 2>/dev/null

wget -q -O /tmp/activation.tmp "$URLVAL?UID=$uid&VER=$ver" 2>/dev/null

# Save with old (default) user/pass
/usr/local/opendomo/saveSystemConfiguration.sh admin opendomo

